Visualization of Program Dependence Graphs
نویسندگان
چکیده
The Java HotSpotTM server compiler of Sun Microsystems uses intermediate graph data structures when compiling Java bytecodes to machine code. The graphs are program dependence graphs, which model both data and control dependencies. For debugging, there are built-in tracing mechanisms that output a textual representation of the graphs to the command line. This thesis presents a tool which displays the graphs of the server compiler. It records intermediate states of the graph during the compilation of a method. The user can then navigate through the graph and apply rule-based filters that change the appearance of the graph. The tool calculates an approximation of the control flow to cluster the nodes of the graph into blocks. Using a visual representation of the data structures speeds up debugging and helps understanding the code of the compiler. The thesis describes the code added to the server compiler and the Java application that displays the graph. Additionally, the server compiler and the NetBeans platform are outlined in general. Kurzfassung Der Java HotSpotTM Server Compiler von Sun Microsystems benutzt Graphen als temporäre Datenstrukturen beim Kompilieren von Java Bytecodes zu Maschinencode. Die Graphen des Compilers sind Programmabhängigkeitsgraphen, mit denen sowohl der Kontrollfluss als auch die Datenabhängigkeiten modelliert werden. Für die Suche von Fehlern kann eine textuelle Repräsentation der Graphen auf die Kommandozeile ausgegeben werden. Diese Arbeit beschreibt ein Programm zur Anzeige der Graphen des Server Compilers. Bei der Kompilierung einer Methode werden Zustände des Graphen aufgezeichnet. Der Benutzer kann durch den Graphen navigieren und regelbasierte Filter anwenden, um die graphische Anzeige des Graphen zu verändern. Das Programm berechnet eine Annäherung des Kontrollflusses, um die Knoten in Blöcke zu gruppieren. Die Verwendung einer graphischen Repräsentation der Datenstrukturen beschleunigt die Fehlersuche und hilft den Quelltext des Compilers zu verstehen. Die Arbeit behandelt den Quelltext, der zum Server Compiler hinzugefügt wurde, und die Java Anwendung, die den Graphen anzeigt. Weiters werden der Server Compiler und die NetBeans Plattform beschrieben.
منابع مشابه
The Effect of an Educational Program for Mental Visualization to Teaching Some Shooting Skills for Basketball Beginners
Background. Although the educational program for teaching basketball shooting has been discussed, the mental visualization of teaching shooting skills for beginners has not been discussed yet. Objectives. The purpose of this study is to identify the effect of mental visualization in teaching some types of basketball shooting skills. Methods. The experimental method was chosen for its suitabil...
متن کاملVariable Data-Flow Graph for Lightweight Program Slicing and Visualization
To understand the behavior of a program, developers often need to read source code fragments in various modules. Systemdependence-graph-based (SDG) program slicing is a good candidate for supporting the investigation of data-flow paths among modules, as SDG is capable of showing the data-dependence of focused program elements. However, this technique has two problems. First, constructing SDG re...
متن کاملSlicing Aspect-Oriented Software
Program slicing has many applications in software engineering activities including program comprehension, debugging, testing, maintenance, and model checking. In this paper, we propose an approach to slicing aspect-oriented software. To solve this problem, we present a dependencebased representation called aspect-oriented system dependence graph (ASDG), which extends previous dependence graphs,...
متن کاملBased Software Security Assessments 1 Schedule 3 Pattern Matching Security Properties of Code using Dependence Graphs
In recent years researchers have presented several tools for statically checking security properties of C code. But they all (currently) focus on one or two categories of security properties each. We have proposed dependence graphs decorated with type-cast and range information as a more generic formalism allowing both for visual communication with the programmer and static analysis checking se...
متن کاملPattern Matching Security Properties of Code using Dependence Graphs
In recent years researchers have presented several tools for statically checking security properties of C code. But they all (currently) focus on one or two categories of security properties each. We have proposed dependence graphs decorated with type-cast and range information as a more generic formalism allowing both for visual communication with the programmer and static analysis checking se...
متن کاملThe Multi-Procedure Equivalence Theorem
This paper concerns the question of whether program dependence graphs are “adequate” as a program representation. Previous results on the adequacy of program dependence graphs have been limited to a language without procedures and procedure calls. Our main result is a theorem that extends previous results to a language with procedures and procedure calls. The theorem shows that if the program d...
متن کامل